# -*- coding: utf-8 -*-
# @Time    : 2022/9/29 9:23
# @Author  : Yanfeng
# @Email   : sxyanfeng2014@163.com
# @File    : wish_listing_management_page_locs.py
# @Software: PyCharm
from selenium.webdriver.common.by import By

class Wish_Listing_Management_Page_Locs:
    """page wish_listing管理页面"""
    #frmain->iframeSubMenu
    frame_iframeSubMenu = (By.ID,'iframeSubMenu')

    #单个刊登+号按钮  frmain>iframeSubMenu>
    only_publish_button = (By.XPATH,'//*[@id="Divdatagrid"]/div[2]/ul/li/a[1]')

    #批量刊登按钮
    batch_publish_button = (By.XPATH,'//*[@id="Divdatagrid"]/div[2]/ul/li/a[2]')

    #列表第一个li's'ting 复制按钮
    first_copy_listing = (By.XPATH,'')
    # SKU输入框
    sku_input = (By.XPATH,'//*[@id="Divdatagrid"]/div[3]/table/tbody/tr/td[1]/span[2]/input[1]')
    #搜索按钮
    sku_search_button = (By.XPATH,'//*[@id="Divdatagrid"]/div[3]/table/tbody/tr/td[6]/a[1]/span/span[1]')
    """page  选择商品"""
    """frmain>OpenIframeWin"""
    #内嵌页OpenIframeWin
    OpenIframeWin = (By.XPATH,'//iframe[@id="OpenIframeWin" and @src="/IrobotBox/Wish/ProductSelect.aspx?Level=5"]')
    #SKU9988456 产品勾选框
    product_select = (By.XPATH,'//*[@id="CheckboxBrand" and @value="9988456"]')
    #选择按钮
    select_button = (By.XPATH,'//*[@id="form1"]/div[3]/div[1]/a[1]/span/span[1]')

    """page   wish 产品上传"""
    """frmain>iframe_UploadWishProduct"""
    #iframe iframe_UploadWishProduct
    iframe_UploadWishProduct = (By.XPATH,'//iframe[@id="iframe_UploadWishProduct"]')
    #来源渠道下拉按钮
    lyqd_drop_down_button = (By.XPATH,'//input[@id="_easyui_textbox_input11" and contains(@placeholder,"--请选择渠道来源--")]/preceding-sibling::span/a')
    # #来源渠道下拉内容
    # lyqd_drop_down_content = (By.XPATH,'//*[@id="_easyui_combobox_i2_0" and contains(text(),"wish-01-US")]')
    #产品标题输入框
    cpbt_input = (By.XPATH,'//*[@id="_easyui_textbox_input1" and contains(@placeholder,"在这里输入产品标题")]')
    #产品运费输入框左
    cpyf_input = (By.XPATH,'//*[@id="_easyui_textbox_input23"]')
    #批量生成按钮
    plsc_button = (By.XPATH,'//*[@id="frm"]/div[5]/table/thead/tr/th[4]/a')
    #sku1 数量输入框
    sku1_quantity_input = (By.XPATH,'//*[@id="ProVar"]/tr[1]/td[10]/input')
    #sku1 发货期左输入框
    sku1_Delivery_date_left_input = (By.XPATH,'//*[@id="ProVar"]/tr[1]/td[11]/input[1]')
    #sku1发货期右输入框
    sku1_Delivery_date_right_input = (By.XPATH,'//*[@id="ProVar"]/tr[1]/td[11]/input[2]')
    #sku2_数量输入框
    sku2_quantity_input = (By.XPATH,'//*[@id="ProVar"]/tr[2]/td[10]/input')
    #sku2 发货期左输入框
    sku2_Delivery_date_left_input = (By.XPATH,'//*[@id="ProVar"]/tr[2]/td[11]/input[1]')
    #sku2 发货期右输入框
    sku2_Delivery_date_right_input = (By.XPATH,'//*[@id="ProVar"]/tr[2]/td[11]/input[2]')
    #sku3 数量输入框
    sku3_quantity_input = (By.XPATH,'//*[@id="ProVar"]/tr[3]/td[10]/input')
    #sku3 发货期左输入框
    sku3_Delivery_date_left_input = (By.XPATH,'//*[@id="ProVar"]/tr[3]/td[11]/input[1]')
    #sku3 发货期右输入框
    sku3_Delivery_date_right_input = (By.XPATH,'//*[@id="ProVar"]/tr[3]/td[11]/input[2]')
    #保存按钮
    save_button = (By.XPATH,'//*[@id="btnSave"]/a')

    """page OpenIframeWin 从产品库批量刊登"""
    """frmain>OpenIframeWin1"""
    #内嵌页
    OpenIframeWin1 = (By.XPATH,'//*[@id="OpenIframeWin" and @src="/IrobotBox/Wish/AddListingFromSysProduct.aspx"]')
    #来源渠道下拉按钮
    lyqd_drop_down_button1 = (By.XPATH,'//*[@id="divHead"]/table/tbody/tr[1]/td[1]/span/span/a')
    #产品运费输入框
    cpyf_input1 = (By.XPATH,'//*[@id="txtShipping"]')
    #选择产品按钮
    xzcp_button = (By.XPATH,'//*[@id="btnSelectPro"]/a')
    #sku1 标题输入框
    sku1_title_input = (By.XPATH,'//*[@id="1134591"]')
    #sku2 标题输入框
    sku2_title_input = (By.XPATH,'//*[@id="1132873"]')
    #保存按钮
    save_button1 = (By.XPATH,'//*[@id="btnSave"]/a')

    #提示框提示信息
    prompt_information = (By.XPATH,'//div[text()="操作成功，是否关闭页面？"]')
    """page OpenIframeWin 选择产品"""
    """frmain>OpenIframeWin2"""
    #内嵌页
    OpenIframeWin2 = (By.XPATH,'//*[@id="OpenIframeWin" and @src="/IrobotBox/Wish/ProductSelectSKU.aspx?txtboxid="]')
    #产品1勾选框
    chanp1_select = (By.XPATH,'//*[@id="CheckboxBrand" and @value="9988456"]')
    #产品2勾选框
    chanp2_select = (By.XPATH,'//*[@id="CheckboxBrand" and @value="9969729"]')
    #选择按钮
    select_button1 = (By.XPATH,'//*[@id="form1"]/div[3]/div[1]/ul/li[1]/a/span/span')
